﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Dto.PagingDto>" %>
        <p id="paging">
            <a title="<%=Model.FirstPageNo%>" href="#">&lt;&lt;</a> <a title="<%=Model.PreviousPageNo%>"
                href="#">&lt;</a>
            <%
                for (int i = Model.PageMinNumber; i <= Model.PageMaxNumber; i++)
                {
%>
            <%
                    string showPageNo = Model.CurrentPageNo == i ? "<strong>" + i + "</strong>" : i.ToString();%>
            <%
                    if (Model.CurrentPageNo == i)
                    {%>
            <a title="<%=i%>" href="#" class="curr"><span style="color: red">
                <%=showPageNo%></span></a>
            <%
                    }
                    else
                    {%>
            <a title="<%=i%>" href="#" class="num">
                <%=showPageNo%></a>
            <%
                    }%>
            <%
                }%>
            <a title="<%=Model.NextNo%>" href="#" class="next">&gt;</a> <a title="<%=Model.LastPageNo%>"
                href="#">&gt;&gt;</a>
        </p>
<input type="hidden" name="currentPageNo" id="currentPageNo" />
<script type="text/javascript">
    $("#paging > a").click(function () {
        $("#currentPageNo").val(this.title);
        $("#pagingForm").submit();
    });
</script>
